package com.hualan.mapper;

import com.hualan.domain.LevelAndGood;
import com.hualan.domain.Teacher;
import com.hualan.domain.TeacherAndGood;
import com.hualan.domain.TeacherGood;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 19594
* @description 针对表【teacher_good(咨询师与擅长领域中间表，用于存储咨询师和擅长领域的多对多关系)】的数据库操作Mapper
* @createDate 2024-09-06 16:54:17
* @Entity com.hualan.domain.TeacherGood
*/
public interface TeacherGoodMapper {

    int deleteByPrimaryKey(Long id);

    int insert(TeacherGood record);

    int insertSelective(TeacherGood record);

    TeacherGood selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TeacherGood record);

    int updateByPrimaryKey(TeacherGood record);

   //根据获取到的咨询师id查询对应的goodname,之后进行循环遍历
    List<TeacherAndGood> selectTeacherByGoodname(int id);

    //根据获取的good.name，teacherlevel.name查询对应的teacher表
    List<Teacher> selectTeacherByLevelGood(@Param("level") String level, @Param("good") String good);

    //根据good.name,level.name,teacher.address筛选teacher表
    List<Teacher> selectTeacherByLevelGoodAddress(@Param("level")String level, @Param("good") String good, @Param("address") String address);
}
